package com.sunshine.pojo;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * Log实体类
 * @author NGU-sunshine
 *
 */
public class Log implements Serializable{
	/**
	 * 序列化版本ID
	 */
	private static final long serialVersionUID = 4035331997714534152L;
	private Integer logId;
	private Date logTime;
	private String threadName;
	private String logLeval;
	private String className;
	private String logInfo;

	@Override
	public String toString() {
		return "AppLog [logId=" + logId + ", logTime=" + logTime + ", threadName=" + threadName + ", logLeval="
				+ logLeval + ", className=" + className + ", logInfo=" + logInfo + "]";
	}

	public Log() {
	}

	public Log(Date logTime, String threadName, String logLeval, String className, String logInfo) {
		super();
		this.logTime = logTime;
		this.threadName = threadName;
		this.logLeval = logLeval;
		this.className = className;
		this.logInfo = logInfo;
	}
	//返回格式化后的日期
	public String getLogTimeStr() {
		if(this.logTime != null) {
			DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			String format = df.format(logTime);
			return format;
		}
		return null;
	}
	public Integer getLogId() {
		return logId;
	}

	public void setLogId(Integer logId) {
		this.logId = logId;
	}

	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	public String getThreadName() {
		return threadName;
	}

	public void setThreadName(String threadName) {
		this.threadName = threadName;
	}

	public String getLogLeval() {
		return logLeval;
	}

	public void setLogLeval(String logLeval) {
		this.logLeval = logLeval;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getLogInfo() {
		return logInfo;
	}

	public void setLogInfo(String logInfo) {
		this.logInfo = logInfo;
	}

}
